home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / util / rexx / rmh.lha / rmh / examples / ra.rexx < prev    next >
OS/2 REXX Batch file  |  1999-04-23  |  1KB  |  36 lines

  1. /*
  2. Show how to use ReadArgs()
  3. */
  4.  
  5. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  6. prg=ProgramName("NOEXT")
  7.  
  8. /* this is the template of AmigaDOS list command" */
  9. template = "DIR/M,P=PAT/K,KEYS/S,DATES/S,NODATES/S,TO/K,SUB/K,SINCE/K,UPTO/K,QUICK/S,BLOCK/S,NOHEAD/S,FILES/S,DIRS/S,LFORMAT/K,ALL/S"
  10.  
  11. if ~RMH_ReadArgs(template) then do
  12.     call PrintFault(IoErr(),prg)
  13.     exit
  14. end
  15.  
  16. if parm.0.mult>0 then
  17.     do i=0 to parm.0.mult-1
  18.         say "DIR" i":" parm.0.value.i
  19.     end
  20.  
  21. if parm.1.flag then say "PAT:" parm.1.value
  22. if parm.2.flag then say "KEYS"
  23. if parm.3.flag then say "DATES"
  24. if parm.4.flag then say "NODATES"
  25. if parm.5.flag then say "TO:" parm.5.value
  26. if parm.6.flag then say "SUB:" parm.6.value
  27. if parm.7.flag then say "SINCE:" parm.7.value
  28. if parm.8.flag then say "UPTO:" parm.8.value
  29. if parm.9.flag then say "QUICK"
  30. if parm.10.flag then say "BLOCK"
  31. if parm.11.flag then say "NOHEAD"
  32. if parm.12.flag then say "FILES"
  33. if parm.13.flag then say "DIRS"
  34. if parm.14.flag then say "LFORMAT:" parm.14.value
  35. if parm.15.flag then say "ALL"
  36.